Conversation
src/base/os.lua
Outdated
|
|
||
| function os.findsubdirheader(headerpath, additionalpaths) | ||
| -- headerpath: a partial header file path | ||
| -- additionalpaths: required; a string or table of subdirectory paths |
There was a problem hiding this comment.
Doc style is more often the one from os.findlib than os.findheader
|
|
||
| ### Availability ### | ||
|
|
||
| Premake 5.0-beta9 or later. |
There was a problem hiding this comment.
Which version should it use here?
There was a problem hiding this comment.
5.0 -- The next release will be 5.0 stable
There was a problem hiding this comment.
Because Premake’s version numbers look rather conservative, I assumed that versions accepting new features would not become stable releases.
There was a problem hiding this comment.
We have decided to just cut it as a stable release. We won't be breaking any more APIs past 5.0 (hopefully)
|
|
||
| ### Availability ### | ||
|
|
||
| Premake 5.0 or later. |
There was a problem hiding this comment.
Possibly add a See Also section for os.findsubdirheader.
nickclark2016
left a comment
There was a problem hiding this comment.
Agree with @Jarod42's comments. Address those and I'll be happy to merge.
- `os.findsubdirheader`: better support for header files in subdirectory than `os.findheader` - update comment & document of `os.findheader`
85a7f9e to
94c1353
Compare
|
The documents and comments have been updated. Please feel free to modify them, as English is not my native language. |
What does this PR do?
Add an API
os.findsubdirheaderwhich can support searching relative paths.Some libraries, by default, install header files within folders. For example, the header files for libfreetype-dev are located in:
Previously, if a program included the header with
#include <ft2build.h>, you had to use:os.findheader("freetype2/ft2build.h") .. "freetype2"to locate it.
Now you can simply use:
os.findsubdirheader("ft2build.h", "freetype2")to achieve the same result.
How does this PR change Premake's behavior?
New API, no change to the existing APIs.
Anything else we should know?
This PR replace and close #2469 .
Did you check all the boxes?
closes #XXXXin comment to auto-close issue when PR is merged)You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!